#include<stdio.h>
long long f(int n){
	if(n<2)return 1;
	return f(n-1)*2+n;
}
int main(){
	int n;
	scanf("%d",&n);
	printf("%lld %lld",((long long)1<<n)-1,f(n));
	return 0;
}